home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / zcexe987.arc / phodir.t < prev    next >
Text File  |  1987-09-25  |  23KB  |  649 lines

  1.     ::rev 09-25-87 for ZCOMM
  2.     cls; goto cmdch
  3. ak    lput "\r\n\E[1;5mType space to Continue\E[m"; if y
  4.     lput "\E[2A\E[2K"
  5. busy    speed 1200 putw "ATM0H1\r"
  6. reset    speed 1200; putw "ATZ\r";pat 1 OK; wait -f3
  7. twx    if twxout speed 1200 %s8 f -qxh twxout;o
  8.     else echo " No file to Send. "
  9. tryd    %telno
  10. waketb    pat 9 OK; ena -dt
  11.     while "!9&&L<2" put "ATZ\r"  wait -f1
  12.     if 9 goto wak1
  13.     bye; br        : Wake up the modem, including TrailBlazer
  14.     pat 1 "A"
  15.     while "!1&&L<30" putw "A"
  16.     if 1 put "TZ\r"; wait -f2
  17.     while "!9&&L<3" put "ATZ\r"  wait -f1
  18.     if 9 goto wak1
  19.     sp 19200 echo "19200 bps"
  20.     bye; br; br; br; while "!9&&L<2" put "ATZ\r"  wait -f1
  21.     while "!9&&L<10" put "AT\r"  wait -f1
  22.     if 9 goto wak1
  23.     echo "No response From MODEM" dis -Q
  24.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  25.     if 9 goto wak1
  26.     echo "No response From MODEM"
  27.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  28.     if 9 goto wak1
  29.     echo "No response From MODEM: setting 2400 bps"; sp 2400
  30.     bye; sleep 4; br; br; while "!9&&L<2" put "ATZ\r"  wait -f2
  31.     if 9 goto wak1
  32.     echo "No response From MODEM: setting 1200 bps"; sp 1200
  33.     while "!9&&L<20" o sleep 9 bye sleep 9 put "ATZ\r"  wait -f2
  34.     if 9 goto wak1
  35.     echo "No response From MODEM"
  36. wak1:    pat 9l OK
  37.     while "!9&&L<10" put "AT\r"  wait -f1
  38.     dis -t;  ret
  39. dial    pat; pat 0 K\r\n; ena -d
  40.     bye
  41.     put "ATZ\r"; wait -f3; if !0 wait -f3
  42.     if !0 echo "Initializing MODEM"; br; sleep 60; put "ATZ\r"; wait -f5
  43.     if !0 put "AT E1 Q0 S7=60 V1 X1\r"; wait -f3
  44.     if "!0&&S>1201" speed 1200 put "ATZ\r"; wait -f3; if !0 wait -f3
  45.     if "!0&&S>301" speed 300 put "ATZ\r"; wait -f3; if !0 wait -f3
  46.     if !0 put "AT E1 Q0 S7=60 V1\r"; wait -f3
  47.     if !0 echo "No response From MODEM"; pat; fail
  48.     sleep 4
  49.     put "ATS6=5 S8=4 S0=0\r" wait -f2
  50.     pat 0c ";"
  51.     dis -d
  52.     put %mprefix; putw %telno\r
  53.     if 0 wait -f30; echo "Hit SPACE to Hang Up"; return
  54.     pat 9l OK
  55.     pat 1i "CONNECT\r"; pat 2i "NO CARRIER"; pat 3 "BUSY"; pat 4 RING;
  56.     pat 5l "ECT 12"; pat 6l "ECT 24"; pat 7l "CONNECT FAST"
  57.     pat 8 "NO DIAL TONE"; pat 10l "CONNECT 300"
  58.     wait -f60
  59.     while "4&&!L>3" wait -f20
  60.     if "1||10" sp 300 pat; return
  61.     if 5 sp 1200 pat; return
  62.     if 6 sp 2400 pat; return
  63.     if 7 sp 19200 pat; return
  64.     if !9 bye
  65.     pat; fail
  66. askspd    lput "1200 baud?"; if y sp 1200; return
  67.     lput "2400 baud?"; if y sp 2400; return
  68.     lput "4800 baud?"; if y sp 4800; return
  69.     lput "9600 baud?"; if y sp 9600; return
  70.     lput "19200 baud?"; if y sp 19200; return
  71.     lput "300 baud then."; sp 300; return
  72. callcis    speed 1200
  73.     if %s3 sets telno %s3; gosub tryd; if c sleep 20 put \3 return
  74.     speed 300
  75.     if %s2 sets telno %s2; gosub tryd; if c sleep 20 put \3 return
  76.     sp 1200
  77.     if %s5 sets telno %s5; gosub tryd; if c gosub tym12; return
  78.     if %s4 sets telno %s4; gosub tryd; if c gosub tel12; return
  79.     echo "Sorry, none of the numbers are working right now"
  80.     gosub ak
  81.     fail
  82. tel12    pat 1 TERMINAL
  83.     while "c&&!1" put "\r" wait -f2
  84.     if !c fail
  85.     pat 1 @
  86.     put "D1\r"; wait -f40
  87.     if !c fail
  88.     if !1 o fail
  89.     put "C 202202\r"
  90.     return
  91. tym24    wait -f5
  92.     in !c fail
  93.     put A pat 1 "log in"; wait
  94.     put "%s1\r"; return
  95. tym12    pat 1 x; wait
  96.     if !c fail
  97.     put A pat 1 "log in"; wait
  98.     if !c fail
  99.     put "%s1\r"; return
  100. xsetup    port 1; : if !c speed 1200 putw "ATZ\r"
  101.     pd1; pz480    : turn on time stamping, set PST timezone
  102.     set mprefix ATDP    : Pulse Dial
  103.     : set mprefix ATDT    : Tone Dial
  104.     set mcommand "gosub dial"
  105.     set l "1"; set m "1"
  106.     set answerback "\r\nYOUR NAME CITY\r\n\21"
  107.     : ps8 :set C/G status line attribute to dim
  108.     : set phones "c:/phones.t"
  109.     echo "Resetting Function Keys"; reskeys
  110.     set f3 @rb;  set f4 "@echo Working...;  gosub tlearn"
  111.     set f6 "@accept s2 Receive-File: rc %s2"
  112.     set f7 "@accept s1 Send-File: sx %s1"
  113.     : set f8 "\PXXXXX"
  114.     : accept xpassword "\E[mMaster Password: \E[8m"; lput "\E[m"
  115.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  116.     if f/zmanh.hlp set helpfile "@yhp /zmanh.hlp"; set f10 "@help"
  117.     if fzmanh.hlp set helpfile "@yhp zmanh.hlp"; set f10 "@help"
  118.     set f11 "@find speed %phones"
  119.     set f12 "@accept s1 Name:; find \n%s1 %phones"
  120.     set f13 "@find \\\;\r %phones"
  121.     set f14 "@speed 1200 putw ATH\r"
  122.     : display bell=visual
  123.     set emdir /memo; set twxfile twx;
  124.     : set call1 ATZ\r\336ATZ\r
  125.     set call2
  126. @bye; sleep 3; putw "\336ATZ\r\336\336ATX1 M0 S0=1\r"; clears; ena -8n
  127.     : (AT commands above are repeated to make sure modem obeys them)
  128.     : set callpath /tmp/*.xx?
  129.     set outahost
  130. @bye; putw "ATZ\r"
  131.     :::  DO NOT USE BACKSLASHES FOR FILENAMES
  132.     : set calllog c:/calllog
  133.     : set rxlog c:/tmp/rxlog
  134.     : set txlog c:/tmp/txlog
  135.     : set tmp /yam/tmp
  136.     : set lib /yam/lib
  137.     set quitcmd \003\336off\r
  138.     if dc ps4 pn2 pr97    :if RGB, green+red stat+color rev video
  139.     return
  140. setup    echo "Running ..."
  141.     set mprefix ATDP    : Pulse Dial
  142.     : set mprefix ATDT    : Tone Dial
  143.     if dg>10000 return
  144.     p-1; set mcommand "gosub dial"
  145.     if da>1 goto setu1
  146.     if !flocal.t gosub sinit; gosub .local.t; goto setu1
  147.     gosub .local.t
  148.     echo "Hello %s6 %s7."
  149.     lput "Has your phone number info changed since the\r\n"
  150.     lput "last time you entered your name (y/n) ?"
  151.     if y del local.t; gosub sinit; gosub .local.t
  152.     if c gosub carrier
  153. setu1:    if dd pd1; pz480
  154.     pe0
  155.     set f3 @rb;  set f4 "@echo Working...;  gosub tlearn"
  156.     set f5 "@accept s1 Send-File(s): sz %s1"
  157.     set f6 "@accept s2 Receive-File: rc %s2"
  158.     set f7 "@accept s1 Send-File: sx %s1"
  159.     set f8 "\PXXXXX"
  160.     set f11 "@find speed %phones"
  161.     set f12 "@accept s1 Name:; find \n%s1 %phones"
  162.     set f13 "@find \\\;\r %phones"
  163.     set f14 "@speed 1200 putw ATH\r"
  164.     if fyamhelp.t set helpfile "yamhelp.t"; set f10 "@help"
  165.     if f/zmanh.hlp set helpfile "@yhp /zmanh.hlp"; set f10 "@help"
  166.     if fzmanh.hlp set helpfile "@yhp zmanh.hlp"; set f10 "@help"
  167.     if da>1 return
  168.     : return : uncomment this line to remove automatic menu startup
  169.     sets menu %phones
  170.     cls; goto cmdch
  171. demo    cls
  172. cmdch:    echo " ZCOMM Beginner's Menu "
  173.     display nlmode nooverstrike
  174.     lput "\ns  Generate a script with AI \E[1mTurboLearn Script Writer\E[m(Tm)\n"
  175.     if fnewscr.t lput "e  Execute your new script in newscr.t\n"
  176.     lput "f  Flash-up HELP Processor\n"
  177.     lput "a  Add a new system entry to the Telephone Directory\n"
  178.     lput "c  Compuserve Online Demo (requires modem)\n"
  179.     lput "d  Dial telephone number and connect\n"
  180.     lput "g  Go Local (Direct Connection)\n"
  181.     lput "h  Host Operation demo (dial-in)\n"
  182.     lput "l  List file names in current directory\n"
  183.     lput "n  Newest files listed first\n"
  184.     if !dS lput "o  Display Ordering Information\n"
  185.     lput "r  Review (circular buffer search/cut/paste) demo\n"
  186.     lput "t  Call Telegodzilla (Omen's Software Downloading System)\n"
  187.     lput "u  Utility command demo\n"
  188.     lput "x  eXit to DOS\n"
  189.     lput "z  exit to ZCOMM command prompt\n\n"
  190.     display nonlmode
  191. choos:    acceptl1 s1 "Please enter your menu choice "
  192.     if is1,a gosub add; cls; goback cmdch
  193.     if is1,c call cidemo; cls; goback cmdch
  194.     if is1,d call xdnum; cls; goback cmdch
  195.     if is1,e call .newscr.t;  goback choos
  196.     if is1,f help; goback cmdch
  197.     if is1,g call glocal; cls; goback cmdch
  198.     if is1,h gosub host; host; return
  199.     if is1,l dirr; goback choos
  200.     if is1,n dirt; goback choos
  201.     if is1,o gosub order; goback choos
  202.     if is1,r kill; gosub review; goback choos
  203.     if is1,s echo "Working...";  gosub tlearn; acceptl1 s0 "Hit Enter ";  goback cmdch
  204.     if is1,t call telegodzilla; cls; goback cmdch
  205.     if is1,u gosub udemo; cls; goback cmdch
  206.     if is1,x x
  207.     if is1,y goto quitt
  208.     if is1,z goto quitt
  209.     cls; echo "Unknown Command"; goback cmdch
  210. udemo:    cls;  echo "Enabling debug output to show the commands"; pv4
  211.     echo "The find command searches files for a string, case insensitive"
  212.     find zcom *.t
  213.     gosub ak
  214.     echo "The sum command calculates file checksum compatible with Unix"
  215.     sum local.t
  216.     gosub ak
  217.     echo "Word Count: lines, words, printing characters, and characters"
  218.     echo "The count of printing characters predicts ribbon usage!"
  219.     wc *.t
  220.     gosub ak
  221.     echo "The chek command calculates a 16 bit file CRC useful for comparing"
  222.     echo "Multiple copies of the same file for accurcacy and identity."
  223.     chek local.t
  224.     gosub ak
  225.     cls
  226.     echo "Paced upload transmission demonstration"
  227.     echo "File Upload pacing is used with bulletin boards, etc."
  228.     echo "Note the EXTRA delay at the end of each line"
  229.     display nooverstrike
  230.     open %phones
  231.     echo "Let's just send a little bit from the END of the file"
  232.     seek -120
  233.     ph2; o; t -adhxtp
  234.     close; pv0; dis -dah
  235.     gosub ak
  236.     return
  237.  
  238. 73    speed 1200 %l-603-924-9809 t
  239. amrad-bbs    speed 300 %l-703-734-1387 t
  240. amsat-bbs    speed 300 %l-512-852-8194 t
  241. caf        speed 1200 %s8-3406\;
  242. cidemo    speed 1200 set s1 "cis02"; gosub callcis
  243.     pat 0 OK;
  244.     pat 1i ID:
  245.     pat 2 "please log in: "
  246.     pat 3 "DISCONNECTED"
  247.     pat 4 "?? LOG"
  248.     pat 5i "more !"
  249.     pat 6$ "!"
  250.     pat 7i "continue!"
  251.     wait;  put 77770,101\r
  252.     pat 1i assword:; wait; if !1 goto cid2
  253.     echo "Sending PASSWORD"; put FREE-DEMO\r
  254.     wait
  255. cid2:    if "3||2" echo " Login may be possible through a Compuserve Node "
  256.     if "1||4||3||2" echo " Try Again Later "; o; sleep 50; return
  257.     pat;
  258.     pat 1i "menu !"
  259.     pat 2i "page !"
  260.     pat 3i "choice !"
  261.     pat 4i "continue!"
  262.     pat 5i "more !"
  263.     pat 6$ "!"
  264.     put \25s\r
  265.     wait put "\025t\r"
  266.     wait put "\0253\r"
  267.     wait put "\025s 1\r"
  268.     wait put "\025log\r"
  269.     pat 1i ID:
  270.     wait -f5
  271.     echo "Good Bye Cruel World"
  272.     close
  273.     o
  274.     gosub ak
  275.     gosub review
  276.     return
  277. review    if !fcdemo echo "Sorry, the file \"cdemo\" is missing."; return
  278.     kill; read cdemo
  279.     del cut
  280.     <revv
  281.     review
  282.     echo "Let's play with that file."
  283.     echo "First, a word count"
  284.     wc cut
  285.     echo "Next, 32 bit file CRC, then a Unix style checksum"
  286.     crc cut; sum cut
  287.     sleep 100
  288.     return
  289. cis        speed 1200 nolog 232-4026 sleep 20     : Compuserve via CIS
  290.     put \3
  291. cis:    pat 1 ID:; wait
  292.     put 70001,0001\r pat 1 assword:; wait; put "wrongo\r"
  293.     pat 1 OK; pat 2 Plex!; pat 3 "\nFunction: "; pat 4 "!"
  294.     wait
  295.     if n o return
  296.     pat; t -fcs!p
  297.     return
  298. cis24    speed 2400 nolog 222-2151    : Compuserve via Tymnet 2400 bps
  299.     pat 1i x; wait -f5 put A pat 1 "log in"; wait
  300.     put "cis02;"; goto cis
  301. cis02    speed 1200 nolog 222-0900    : Compuserve via Tymnet
  302.     pat 1i x; wait put A pat 1 "log in"; wait
  303.     put "\030cis02;" goto cis
  304. cisdat    speed 1200 %l-604-687-7144    : Compuserve via Datapac
  305.     sleep 25
  306.     ena -t
  307.     put "..\r"
  308.     pat 1 "DATAPAC"
  309.     wait -f4
  310.     put "P 29400138\r"
  311.     dis -t
  312.     pat 1 "Name:"
  313.     wait -f20
  314.     put "cis\r"
  315.     goto cis
  316. cistel    speed 1200 295-3028        : Compuserve via Telenet
  317.     pat 1 TERMINAL
  318.     while !1 put "\r" wait -f1
  319.     pat 1 @
  320.     put "D1\r"; wait -f4
  321.     if !1 o abort
  322.     put "C 202202\r"
  323.     goto cis
  324.  
  325. navobsy        speed 1200 %l-202-653-1079 t -u7e
  326.     echo " type @tco for list of commands "
  327. nbs        speed 300 %l-301-948-5717 t
  328. nbs2        speed 300 %l-301-948-5718 t
  329. oem        speed 1200 %s8 pat 1i \5;wait;put \1;sb;o
  330. omen-tech    speed 1200 %s8 t
  331. pl24    speed 2400 241-0496 goto pl1    : People-Link via Telenet
  332. pl    speed 1200 295-3028        : People-Link via Telenet
  333. pl1:    patt; patt 1 TERMINAL
  334.     while !1 put "\r" wait -f1
  335.     pf40 patt 1 @
  336.     put "D1\r"; wait
  337.     if !1 o abort
  338.     put "set 0:33,64:1\r"; wait -f1
  339.     put "c 312 63\r"
  340.     pat 1 "PRESS <RETURN>:";  wait -f15;  put "\r"
  341.     pat 1 "ID:";  wait -f15;  put "myacct\r"
  342.     pat 1 "PASSWORD:";  wait -f15;  put "nothis\r"
  343.     set f9 "/next\r"; set f10 "/dlo;fil;xmo;\r\r"
  344.     t
  345. source1200    speed 1200 295-3028    : The Source via Telenet
  346. sourcex:    set  f7 "upi n b "
  347.     set  f9 "upi n g "
  348.     set f8 ",-,*,rb"
  349.     set f10 ",-,*,sb"
  350.     pf3
  351.     patt; patt 1 TERMINAL
  352.     while "L<5&&!1" put "\r" wait -f1
  353.     if !1 off
  354.     pf40 patt 1 @
  355.     put "D1\r"; wait
  356.     if !1 o abort
  357.     put "c 30124\r"
  358.     kill; patt; patt 1 SOURCE; wait
  359.     if !1 o abort
  360.     putw "id ABC123 notthis\r"
  361.     patt; pat 10c "-More-" "@put \r lput \r\E[A\E[2M\E[A"
  362.     pf9999; wait
  363. source300    speed 300 295-3028    : The Source via Telenet
  364.     goto sourcex
  365. telegodzilla    speed 1200 %s8-3746
  366.     ena -Z; display overstrike; cls; pat 1 \n
  367.     while "!1&&c&&L<10" put \r wait -f1
  368.     if !1||!c echo "Access Failed"; o; return
  369.     pat 1 "ease:"; wait -f2
  370.     put "\b\b%s6 %s7\r"; pat 1 ect;wait -f2
  371.     put "y"; pat 1 "-Host"; wait -f5
  372.     if !forder putw "\b\bsz demo/order\r"
  373.     set s0 "TeleGodzilla"
  374. tele1:    echo "You are now Online to \42%s0\42."
  375.     echo "Type F1 when done."; pat;  t -Z!vn
  376.     lput "\Ez Do you wish to disconnect (y/n) "
  377.     if y echo " Disconnecting ... ";put \25\4; wait -f2; o; return
  378.     echo " **************  Rewinding the Capture Buffer  ************** "
  379.     rewind; wait -f0; goto tele1
  380.  
  381. host    echo " host " speed 1200
  382.     set welcome welcome.txt
  383.     set password Ritchie
  384.     set challenge challeng.txt
  385.     set unrestrict "CustomerSupport"    : WARNING - CHANGE THIS!!
  386.     set xhelpfile xyamhelp.t
  387.     set private private; set messages messages
  388.     set emdir "."; set twxfile twx;
  389.     set call2 ATZ\r\336\336ATM1X1S0=1\r\336ATM1X1S0=1\r\336\336
  390.     set outahost "@pk512; putw ATM0H1\r"
  391.     set baudstr "@gosub baud"
  392.     pc40
  393.     return
  394.  
  395. sinit    pv0;  cls
  396.     echo "    Initial setup for ZCOMM with ZMODEM, WXMODEM, etc.        "
  397.     echo "             I need some phone information.                    "
  398.     accept s6 " Your \E[1mFirst\E[0m name please "
  399.     accept s7 " Your Last name please "
  400.     set s8 ""
  401. getac:    accept s8 " Please enter your 3 digit telephone area code, plus <Enter> "
  402.     if !%s8 goto getac
  403.     echo "I need local access numbers for the Compuserve Information Service."
  404.     if dd lput "Shall I search for them (y/n) ?"
  405.     if dd if y echo "300/1200 bps Access Numbers"; find "%s8 " cisnodes.lst
  406.     echo "Just hit <Enter> if your modem doesn't have the indicated speed."
  407.     accept s3 " Please enter the 1200 baud local Compuserve Node phone Number "
  408.     accept s2 " Please enter the 300 baud local Compuserve Node phone Number "
  409.     accept s5 " Please enter the 1200 baud local Tymnet Node phone Number "
  410.     accept s4 " Please enter the 1200 baud local Telenet Node phone Number "
  411.     echo "Creating disk file 'LOCAL.T' for future reference"
  412.     kill; pv0; create -y local.t
  413.     echof " :Area Code is \042%s8\042"
  414.     if %s2 echof " set s2 \042%s2\042"
  415.     if %s3 echof " set s3 \042%s3\042"
  416.     if %s4 echof " set s4 \042%s4\042"
  417.     if %s5 echof " set s5 \042%s5\042"
  418.     if %s6 echof " set s6 \042%s6\042"
  419.     if %s7 echof " set s7 \042%s7\042"
  420.     echof " set s8 1-503-621"
  421.     lput "\EzAre you using a Color Monitor? (y/n) "
  422.     if y echof " if dd&&dc ps4 pn3 pr97 pu6"; ps4 pn3 pr97 pu6
  423.     lput "\r\nIs your display adapter flicker/snow free? (y/n) "
  424.     if y echof " if dd&&dc display warpdrive"; display warpdrive
  425.     lput "\r\nIs your modem connected to COM2? (y/n) "
  426.     if y echof " port 2"; port 2
  427.     lput "\r\nDo you use DTMF (TouchTone) dialing? (y/n) "
  428.     if y echof " set mprefix ATDT"
  429.     lput "\r\nDoes your modem include 2400 bps or higher? (y/n) "
  430.     if y echof " set mcommand \"gosub mm224\""; set mcommand "gosub mm224"
  431.     close; echo "file created"
  432.     if dd echo "Searching for directory entries with your area code"
  433.     if dd find l-%s8- %phones
  434.     if dd echo "Please change the %phones lines shown above to suit your area."
  435.     if !is8,503 return
  436.     kill; pv0; create -+ local.t
  437.     lput "Is 621-3746 (Burlington Exchange) a local call for you ? (y/n) "
  438.     if y echof " set s8 621"
  439.     else echof " set s8 1-621"
  440.     close; return
  441. quitt:    echo "   Type 'menu' to return to this menu   "
  442.     if Jf10,@ echo "       Press F10 for Flash-Up Help      "
  443.     echo "\n\n  The following ABORT message is normal "
  444.     abort
  445. carrier    lput " Type \ESy\Eq if the modem is now connected to a computer: "
  446.     if y echo "OK, just checking"; sleep 30; return
  447.     lput "\r\n\nAlthough ZCOMM can operarte with the modem's\r\n"
  448.     lput "Carrier Detect signal always on, this script (and most other\r\n"
  449.     lput "scripts) require the Carrier Detect signal to read the actual\r\n"
  450.     lput "modem status.  Please adjust the modem accordingly; on the Hayes\r\n"
  451.     lput "SmartModem 1200, switch 6 should be UP. "
  452.     off
  453. xdnum    cls
  454.     if jmcommand,mm224 sp 2400; goto xd1
  455.     lput "Use 2400 Baud (y/n) ? "
  456.     if y speed 2400;  goto xd1
  457.     lput "Use 300 Baud (y/n) ? "
  458.     if y speed 300; goto xd1
  459.     speed 1200;  echo "1200 Baud, then."
  460. xd1:    accept telno "Enter Telephone Number: "
  461.     if !%telno return
  462.     if Jmcommand,2 gosub mm224
  463.     if Jmcommand,l gosub dial
  464.     sets s0 "%telno"
  465.     goto tele1
  466. glocal    cls;  display nonlmode
  467.     lput "Use Port 2 (y/n) ?"
  468.     if y port 2
  469.     else port 1
  470.     gosub askspd
  471.     set s0 "Local"
  472. tele9:    echo "You are now Online to %s0."
  473.     echo "Type F1 when done."; pat;  t -Z!v
  474.     lput "\Ez Finished talking now (y/n) "
  475.     if y goto tele2
  476.     echo " **************  Rewinding the Capture Buffer  ************** "
  477.     rewind; wait -f0; goback tele9
  478. tele2:    lput "\Ez Do you wish to disconnect (y/n) "
  479.     if y echo " Disconnecting ... ";put \25\4; wait -f2; o
  480.     return
  481. order    if forder display overstrike; page order; return
  482.  cls display overstrike
  483.  lput "ZCOMM Registration, Typeset Manual Pages, ZSNP, and update disk sell for $40.00.\r\n"
  484.  lput "                 (Add $10 if you wish a PC-size binder)\r\n"
  485.  lput "\r\n"
  486.  lput "       Send check to Omen Technology, PO Box 4681, Portland OR 97208\r\n"
  487.  lput "Please see Chapter 3 of the ZCOMM User's Manual for more information."
  488.  lput "\r\n"
  489.  return
  490. baud    pat 1 "CONNECT\r\n"; pat 2 "NO CARRIER"
  491.     pat 5 "CONNECT 1200\r\n"; pat 3 "CONNECT 2400\r\n"
  492.     pe-20
  493.     wait -Ef25
  494.     dis -E
  495.     if 1 speed 300 return
  496.     if 5 speed 1200 sleep 20 return
  497.     if 3 speed 2400 sleep 20 return
  498.     kill create -+ rings
  499.     close
  500.     fail
  501.  
  502. : This assumes a Hayes compatible modem set for extended result messages
  503. ::
  504. ::
  505. :: Alternate dial script for Multi Tech 224 modem uses speed fallback.
  506. ::  This also supports Telebit TrailBlazer modems.
  507. :: If the call is placed at > 300 bps, switch to 2400 bps.  Make the
  508. :: call.  If the called modem only supports 1200 or (ugh) 300 bps,
  509. :: the modem will drop back in speed.  The actual connect speed is indicated
  510. :: by a "CONNECT", "CONNECT 1200", or "CONNECT 2400" string.
  511. :: Fallback to 300 bps may be a bit messey, (depending on the answering
  512. :: modem, so a call originated at 300  bps will go out at that speed
  513. ::
  514. ::
  515. mm224    pat; if dd&&v<1 ena -Q
  516.     if "%telno<2" echo "Please do not use \"call mm224\""; abort
  517.     set s0 ""
  518.     if S==450 set s0 "450"; sp 300 echo "300 bps"
  519.     else if "S<9500&&S>111" sp 2400 echo "2400 bps"
  520.     gosub waketb
  521.     put "AT E1 Q0 S10=10 S7=70 V1\r"; wait -f2
  522.     put "ATS6=3 X1 S8=1 S0=0\r" wait -f2
  523.     put "ATX3\r" wait -f2  :: Change this as necessary for your modem
  524.     put %mprefix; putw %telno\r; dis -Qdt
  525.     if "jtelno,;"  echo "Lift Telephone Receiver, Hit SPACE"; return
  526.     pat 1 "CONNECT\r"; pat 2i "NO CARRIER"; pat 3 "BUSY"; pat 4 RING;
  527.     pat 5l "ECT 12"; pat 6l "ECT 24"; pat 7l "CONNECT FAST"
  528.     pat 8 "NO DIAL TONE"; pat 10l "CONNECT 300"
  529.     pat 11 "CONNECT 9600"; pat 12l "CONNECT 19200"
  530.     wait -f70
  531.     while "4&&!L>3" wait -f20
  532.     if "1||10" if is0,450 sp 450; echo "450 bps"; pat; return
  533.     if "1||10" sp 300 pat; return
  534.     if 5 sp 1200 pat; return
  535.     if 6 sp 2400 pat; return
  536.     if "du&&7" sp 9600 echo "9600 bps"; pat; return
  537.     if "7||11" sp 19200; pat; return
  538.     if 12 sp 19200; pat; return
  539.     echo "No Connect Message Detected."
  540.     if !9 bye
  541.     pat; o; fail
  542.  
  543.     : inittb initializes the TrailBlazer NVRAM for these scripts
  544. inittb    sp 9600; ena -t; gosub waketb
  545.     putw "at&F S0=0 S50=0 S52=1 S53=1 S54=1 S58=3 S68=3\r\336\336"
  546.     putw "ATS51=255 \r\336\336"
  547.     putw "atS111=255 S95=2 S92=1 S52=2\r\336\336"
  548.     putw "AT&W\r\336\336"
  549.     return
  550.     : initfc initializes the Fastcomm 2496T for these scripts
  551. initfc    sp 9600; gosub waketb
  552.     putw "AT #LDN #LCN S57=2 #W\r"
  553.  
  554.     :: Generate a script with TurboLearn Script Writer(TM)
  555. tlearn    set f30 "" :: telephone number, and flag that telno was entered
  556.     if c goto connected
  557.     cls
  558.     accept f30 "Enter Telephone Number "
  559. ag1:    accept f31 "Enter Speed (300, 1200, 2400) "
  560.     if if31,2400 speed 2400 goto ag2
  561.     if if31,1200 speed 1200 goto ag2
  562.     if if31,300 speed 300 goto ag2
  563.     echo "Bad speed"; goback ag1
  564. ag2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  565.     lput "2    System uses 7 bits even parity\r\n"
  566.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  567.     lput "\r\n"
  568.     acceptl1 f32 "Choose one of the above: "
  569.     lput "\r\n"
  570.     ena -8n
  571.     @%f30
  572.     if !c echo "Sorry, no connection"; return
  573.     set f35 ""
  574.     if if32,1 ena -8g; set f35 "ena -8g"
  575.     if if32,2 ena -7e; set f35 "ena -7e"
  576. connected:
  577.     echo "Finish with F1.  Use ALT-B to send a break if necessary"
  578.     learn -y tlrn.tmp
  579. cn2:    if !r echo "WARNING: Learning (recording) terminated prematurely!"
  580.     close
  581.     kill
  582.     create newscr.t
  583.     if !r abort
  584.     echo "Is this to become a Telephone Directory entry (y/n)?"
  585.     if !y goto nodir
  586.     accept f36 "What directory entry name to use? "
  587.     echoc "%f36    speed %f31 %f30 %f35"
  588. nodir:    close;  set f32 ""
  589.     echo "Should the script disconnect the phone line (y/n) ?"
  590.     if !y "!tlearn tlrn.tmp >>newscr.t"; goto scdone
  591.     set f32 "bye;  return"
  592.     echo "Should the script then exit to the Operating System (y/n)?"
  593.     if y  set f32 "off"
  594.     !tlearn -r tlrn.tmp >>newscr.t
  595.     create -+ newscr.t; echof "    %f32";  close
  596. scdone:    echo "Your new script is in the file 'newscr.t' !!"
  597.     if %f30 echo "You may add this file to your Telephone Directory"
  598.     if %f30 echo "Or execute it with 'call %f36.newscr.t'";  return
  599.     echo "You may execute this file with 'source newscr.t'"
  600.     return
  601.  
  602.     :: Add a telephone directory entry
  603. add:    if r close
  604.     cls
  605.     echo "Create New Phone Directory Entry"
  606. xg0:    accept f33 "Enter new directory name: "
  607.     p?0
  608.     lput "Searching for duplicate name"
  609.     find "\n%f33" %phones
  610.     if ? echo "Please choose another name"; goback xg0
  611.     accept f34 "Enter Comments for this number: "
  612.     accept f30 "Enter Telephone Number: "
  613. xg1:    accept f31 "Enter Speed (300, 1200, 2400, 9600, 19200): "
  614.     if if31,19200 speed 2400 goto xg2
  615.     if if31,9600 speed 2400 goto xg2
  616.     if if31,2400 speed 2400 goto xg2
  617.     if if31,1200 speed 1200 goto xg2
  618.     if if31,300 speed 300 goto xg2
  619.     echo "Bad speed"; goback xg1
  620. xg2:    lput "\r\n1    System uses IBM PC (ANSI) line drawing characters\r\n"
  621.     lput "2    System uses 7 bits even parity\r\n"
  622.     lput "3    System uses 8 bits No parity (8n1)\r\n"
  623.     lput "\r\n"
  624.     acceptl1 f32 "Choose one of the above: "
  625.     lput "\r\n"
  626.     set f35 ""
  627.     if if32,1 set f35 " -8g"
  628.     if if32,2 set f35 " -7e"
  629.     kill; pv0; create -+ %phones
  630.     if !%f34 goto nobanr
  631.     echoc "%f33    speed %f31 echo \42%f34\42 %f30 t%f35"
  632.     close; return
  633. nobanr:    echoc "%f33    speed %f31 %f30 t%f35"
  634.     close; return
  635.  
  636.     :: Login script for Byte Information Exchange
  637. bix        speed 1200 222-0900    :: Tymnet local node
  638.         pat 1i "\256"; wait -F2;  put a
  639.         pat 1i "log in"; wait
  640.         ena -h;  put "\bBYTENETI;MGH\r"
  641.         pat 1i "):";  wait
  642.         if jargs,new put "new\r";  t -h; quit
  643.         put "bix\r"
  644.         pat 1i "ame?"; wait
  645.         put "yourname\r"
  646.         pat 1i "assword:"; wait
  647.         dis -h;  put "expensive\r"
  648.         t -h
  649.